var WE;
! function (t, e) {
    WE = {}, window.$App = {}, WE.BaseCore = e.Model.extend({
        initialize: function () { },
        namespace: function (e, n, r) {
            for (var i = e.split("."), a = r || window; i.length > 0;) {
                var o = i.shift();
                a[o] ? 0 == i.length && (a[o] = t.extend(a[o], n)) : a[o] = i.length > 0 ? {} : n || {}, a = a[o]
            }
            return this.trigger("namespace", e), a
        },
        utilCreateScriptTag: function (t, e) {
            var n = this;
            if (e) var r = e,
            e = function (t) {
                r.call(n, t)
            };
            for (var i = t.id, a = this.getScriptPath(t.src), o = t.charset, s = !1, u = document.getElementsByTagName(
                    "head")[0], l = i && document.getElementById(i), c = !document.all && !0 || !1, h = ["trident/7.0",
                        "msie 10.0", "msie 9.0", "chrome", "firefox"], f = 0, d = h.length - 1, m = window.navigator.userAgent
                    .toLowerCase() || ""; d >= f && !(c = m.indexOf(h[f]) > -1 && !0 || !1) ;) f++;
            h = null;
            try {
                l && c && (l.src = "", l.parentNode.removeChild(l), l = null)
            } catch (p) { }
            if (null != l) {
                -1 == a.indexOf("?") && (a += "?"), a += "&" + Math.random(), l.src = a;
                var g = l
            } else {
                var g = document.createElement("script");
                i && (g.id = i), o && (g.charset = o);
                try {
                    -1 == a.indexOf("?") && (a = M139.Text.Url.makeUrl(a, {
                        sid: top.$App.getSid()
                    }))
                } catch (p) { }
                g.src = a, g.defer = !0, g.type = "text/javascript", u.appendChild(g)
            }
            document.all ? g.onreadystatechange = function () {
                ("loaded" == g.readyState || "complete" == g.readyState) && (s = !0, e && e())
            } : (g.onload = function () {
                s = !0, e && e()
            }, g.onerror = function () {
                s = !0, e && e(!1)
            })
        }
    }), WE.BaseCore = new WE.BaseCore({
        jsPath: "/m2012/js"
    }), WE.namespace = function () {
        WE.BaseCore.namespace.apply(WE.BaseCore, arguments)
    }
}(jQuery, Backbone),
function (t) {
    t.Object = function (e) {
        return new t.Object.prototype.init(e)
    }, t.Object.extend = function () {
        var t = arguments.length;
        if (0 == t) return null;
        var e = arguments[0];
        if (1 == t) return e;
        for (var n = 1; t > n; n++) {
            var r = arguments[n];
            if (r instanceof Array || "[object Array]" == Object.prototype.toString.call(r)) for (var i = 0, a = r.length; a >
                    i; i++) e[i] = r[i];
            else for (var o in r) e[o] = r[o]
        }
        return e
    }, t.Object.toString = function (t, e, n) {
        e = e || "=", n = n || "&";
        var r = [];
        for (var i in t) r.push(i + e + t[i]);
        return r.join(n)
    }, t.Object.extend(t.Object, {
        trim: function (t, e) {
            var n = !e;
            for (var r in t) {
                var i = t[r];
                null == i && delete t[r], "object" == typeof i && n && arguments.callee(i)
            }
            return t
        },
        remove: function (e, n) {
            var r = t.Object.extend({}, e);
            if ("string" == typeof n) delete r[n];
            else for (var i = 0, a = n.length; a > i; i++) delete r[n[i]];
            return r
        },
        each: function (t, e) {
            for (var n in t) if (e(n, t[n]) === !1) break
        },
        map: function (t, e) {
            var n = {};
            for (var r in t) n[r] = e(t[r], r);
            return n
        },
        replaceValues: function (t, e, n) {
            for (var r in t) {
                var i = t[r];
                switch (typeof i) {
                    case "string":
                    case "number":
                    case "boolean":
                        for (var a in e) if (r == a) {
                            t[r] = e[a];
                            break
                        }
                        break;
                    case "object":
                        !n && arguments.callee(i, e)
                }
            }
            return t
        },
        toArray: function (t, e) {
            if (void 0 === e) {
                var n = [];
                for (var r in t) n.push(t[r]);
                return n
            }
            if (e instanceof Array) {
                for (var n = [], r = 0, i = e.length; i > r; r++) n.push(t[e[r]]);
                return n
            }
            if (e === !0) {
                var n = [];
                for (var r in t) {
                    var a = [];
                    a[0] = r, a[1] = t[r], n.push(a)
                }
                return n
            }
        },
        toQueryString: function (e, n) {
            if (null == e) return String(e);
            switch (typeof e) {
                case "string":
                case "number":
                case "boolean":
                    return e
            }
            if (e instanceof String || e instanceof Number || e instanceof Boolean || e instanceof Date) return e.valueOf();
            if (t.Object.isArray(e)) return "[" + e.join(", ") + "]";
            var r = arguments.callee,
                i = n ? escape : encodeURIComponent,
                a = [];
            for (var o in e) a.push(i(o) + "=" + i(r(e[o])));
            return a.join("&")
        },
        parseQueryString: function (e, n, r) {
            if (!e || "string" != typeof e) return {};
            for (var i = arguments.callee, a = r ? unescape : decodeURIComponent, o = !n, s = t.String.toValue, u = {},
                    l = e.split("&"), c = 0, h = l.length; h > c; c++) {
                var f = l[c].split("=");
                if (f.length > 1) {
                    var d = a(f[0]),
                        m = a(f[1]);
                    m = o && m.indexOf("=") > 0 ? i(m) : s(m), u[d] = m
                }
            }
            return u
        },
        namespace: function (e, n, r) {
            var i = arguments.callee;
            if (t.Object.isPlain(n) && void 0 === r) {
                var a = e,
                    o = n,
                    e = window;
                return t.Object.each(o, function (t, n) {
                    if ("string" != typeof n) throw new Error("当指定第二个参数为键值对映射表时，值必须为 string 类型");
                    var r = a[t];
                    i(e, n, r)
                }), e
            }
            if ("object" == typeof n && t.Object.isArray(r)) {
                var a = n,
                    s = r;
                return t.Array.each(s, function (t, n) {
                    e[t] = a[t]
                }), e
            }
            if ("string" == typeof n) {
                for (var u = n.split("."), l = e, c = u.length, h = c - 1, f = 0; c > f; f++) {
                    var d = u[f];
                    h > f ? (l[d] = l[d] || {}, l = l[d]) : (void 0 === r && (r = {}), l[d] ? (t.Object.extend(l[d], r),
                        r = l[d]) : l[d] = r)
                }
                return r
            }
        },
        isEmpty: function (t) {
            for (var e in t) return !1;
            return !0
        },
        isWindow: function (t) {
            return t && "object" == typeof t && "setInterval" in t
        },
        isPlain: function (e) {
            if (!e || "object" != typeof e || e.nodeType || t.Object.isWindow(e)) return !1;
            try {
                if (e.constructor && !Object.prototype.hasOwnProperty.call(e, "constructor") && !Object.prototype.hasOwnProperty
                    .call(e.constructor.prototype, "isPrototypeOf")) return !1
            } catch (n) {
                return !1
            }
            var r;
            for (r in e);
            return void 0 === r || Object.prototype.hasOwnProperty.call(e, r)
        },
        isValueType: function (t) {
            return /^(string|number|boolean)$/g.test(typeof t)
        },
        isWrappedType: function (t) {
            for (var e = [String, Number, Boolean], n = 0, r = e.length; r > n; n++) if (t instanceof e[n]) return !0;
            return !1
        },
        isBuiltinType: function (t) {
            for (var e = [String, Number, Boolean, Array, Date, RegExp, Function], n = 0, r = e.length; r > n; n++) if (
                    t instanceof e[n]) return !0;
            return !1
        },
        getType: function (t) {
            return null === t ? "null" : void 0 === t ? "undefined" : "string" == typeof t ? "string" : "number" ==
                typeof t ? "number" : "boolean" == typeof t ? "boolean" : Object.prototype.toString.call(t).slice(8, -1)
        },
        isArray: function (e, n) {
            return n === !0 ? e instanceof Array : e instanceof Array || "Array" == t.Object.getType(e)
        }
    }), t.Object.prototype = {
        constructor: t.Object,
        value: {},
        init: function (t) {
            this.value = Object(t)
        },
        valueOf: function () {
            return this.value
        },
        extend: function () {
            var e = [this.value];
            return e = e.concat(Array.prototype.slice.call(arguments, 0)), this.value = t.Object.extend.apply(null, e),
                this
        },
        trim: function (e) {
            return this.value = t.Object.trim(this.value, e), this
        },
        remove: function (e) {
            return this.value = t.Object.remove(this.value, e), this
        },
        each: function (e) {
            return t.Object.each(this.value, e), this
        },
        map: function (e) {
            return this.value = t.Object.map(this.value, e), this
        },
        replaceValues: function (e, n) {
            return this.value = t.Object.replaceValues(this.value, e, n), this
        },
        toArray: function (e) {
            return t.Object.toArray(this.value, e)
        },
        toString: function (e, n) {
            return t.Object.toString(this.value, e, n)
        },
        toQueryString: function (e) {
            return t.Object.toQueryString(this.value, e)
        },
        parseQueryString: function (e, n, r) {
            return this.value = t.Object.parseQueryString(e, n, r), this
        },
        namespace: function (e, n) {
            return this.value = t.Object.namespace(this.value, e, n), this
        },
        isEmpty: function () {
            return t.Object.isEmpty(this.value)
        },
        isWindow: function () {
            return t.Object.isWindow(this.value)
        },
        isPlain: function () {
            return t.Object.isPlain(this.value)
        },
        isValueType: function () {
            return t.Object.isValueType(this.value)
        },
        isWrappedType: function () {
            return t.Object.isWrappedType(this.value)
        },
        isBuiltinType: function () {
            return t.Object.isBuiltinType(this.value)
        },
        getType: function () {
            return t.Object.getType(this.value)
        },
        isArray: function (e) {
            return t.Object.isArray(this.value, e)
        }
    }, t.Object.prototype.init.prototype = t.Object.prototype
}(window.WE),
function (t) {
    t.String = function (e) {
        if (arguments.length > 1) {
            var n = Array.prototype.slice.call(arguments, 1);
            return t.String.format(e, n)
        }
        return new t.String.prototype.init(e)
    }, t.Object.extend(t.String, {
        format: function (e, n, r) {
            var i = arguments.callee;
            if (t.Array.hasItem(n)) {
                if (t.Array.hasItem(r)) {
                    for (var a = n, o = r, s = e, u = 0, l = o.length; l > u; u++) {
                        var c = a[0] + "" + u + a[1];
                        s = t.String.replaceAll(s, c, o[u])
                    }
                    return s
                }
                if ("object" == typeof r) {
                    var a = n,
                        h = r,
                        s = e;
                    for (var f in h) {
                        var c = a[0] + f + a[1];
                        s = t.String.replaceAll(s, c, h[f])
                    }
                    return s
                }
                if (void 0 === r) {
                    var a = ["{", "}"],
                        o = n;
                    return t.String.format(e, a, o)
                }
                var d = Array.prototype.slice.call(arguments, 2);
                return i(e, n, d)
            }
            if ("object" == typeof n) return i(e, ["{", "}"], n);
            var d = Array.prototype.slice.call(arguments, 1);
            return i(e, ["{", "}"], d)
        },
        formatQueryString: function (e, n, r) {
            if (!n) return e;
            if (e.indexOf("?") < 0) return n = t.Object.trim(n), e + "?" + t.Object.toQueryString(n); {
                var i = e.split("?"),
                    a = i[0],
                    o = i[1],
                    s = t.Object.parseQueryString(o),
                    u = t.Object.extend(s, n);
                t.Object.trim(u)
            }
            return a + "?" + t.Object.toQueryString(u, r)
        },
        replaceAll: function (t, e, n) {
            return t.split(e).join(n)
        },
        removeAll: function (e, n) {
            return t.String.replaceAll(e, n, "")
        },
        trim: function (t) {
            return t.replace(/(^\s*)|(\s*$)/g, "")
        },
        trimStart: function (t) {
            return t.replace(/(^\s*)/g, "")
        },
        trimEnd: function (t) {
            return t.replace(/(\s*$)/g, "")
        },
        split: function (e, n) {
            function r(e, n, i) {
                return i--, t.Array.map(e, function (t, e) {
                    return 0 == i ? String(t).split(n) : r(t, n, i)
                })
            }
            for (var i = String(e).split(n[0]), a = 1, o = n.length; o > a; a++) i = r(i, n[a], a);
            return i
        },
        splitTrim: function (e, n) {
            return n = n || " ", t.Array.map(e.split(n), function (t, e) {
                return "" == t ? null : t
            })
        },
        startsWith: function (t, e, n) {
            if (n) {
                var r = t.substring(0, e.length);
                return r.toUpperCase() === e.toString().toUpperCase()
            }
            return 0 == t.indexOf(e)
        },
        endsWith: function (t, e, n) {
            var r = t.length,
                i = e.length,
                a = r - i;
            if (n) {
                var o = t.substring(a, r);
                return o.toUpperCase() === e.toString().toUpperCase()
            }
            return t.lastIndexOf(e) == a
        },
        contains: function (t, e) {
            return t.indexOf(e) > -1
        },
        padLeft: function (t, e, n) {
            t = String(t);
            var r = t.length;
            if (r >= e) return t.substr(-e);
            n = n || " ";
            var i = [];
            return i.length = e - r + 1, i.join(n) + t
        },
        padRight: function (t, e, n) {
            t = String(t);
            var r = t.length;
            if (r >= e) return t.substring(0, e);
            n = n || " ";
            var i = [];
            return i.length = e - r + 1, t + i.join(n)
        },
        toCamelCase: function (t) {
            var e = /^-ms-/,
                n = /-([a-z]|[0-9])/gi;
            return t.replace(e, "ms-").replace(n, function (t, e) {
                return e.toString().toUpperCase()
            })
        },
        toHyphenate: function (t) {
            return t.replace(/[A-Z]/g, function (t) {
                return "-" + t.charAt(0).toLowerCase()
            })
        },
        between: function (t, e, n) {
            var r = t.indexOf(e);
            if (0 > r) return "";
            r += e.length;
            var i = t.indexOf(n, r);
            return 0 > i ? "" : t.substr(r, i - r)
        },
        toUtf8: function (e) {
            var n = [];
            return t.Array.each(e.split(""), function (t, e) {
                var r = t.charCodeAt(0);
                128 > r ? n.push(r) : 2048 > r ? (n.push((1984 & r) >> 6 | 192), n.push(63 & r | 128)) : (n.push((61440 &
                    r) >> 12 | 224), n.push((4032 & r) >> 6 | 128), n.push(63 & r | 128))
            }), "%" + t.Array.map(n, function (t, e) {
                return t.toString(16)
            }).join("%")
        },
        toValue: function (t) {
            if ("string" != typeof t) return t;
            var e = {
                0: 0,
                1: 1,
                "true": !0,
                "false": !1,
                "null": null,
                undefined: void 0,
                NaN: 0 / 0
            };
            return t in e ? e[t] : t
        }
    }), t.String.prototype = {
        constructor: t.String,
        value: "",
        init: function (t) {
            this.value = String(t)
        },
        toString: function () {
            return this.value
        },
        valueOf: function () {
            return this.value
        },
        format: function (e, n) {
            return this.value = t.String.format(this.value, e, n), this
        },
        formatQueryString: function (e, n) {
            return this.value = t.String.formatQueryString(this.value, e, n), this
        },
        replaceAll: function (e, n) {
            return this.value = t.String.replaceAll(this.value, e, n), this
        },
        removeAll: function (e) {
            return this.value = t.String.replaceAll(this.value, e, ""), this
        },
        trim: function () {
            return this.value = t.String.trim(this.value), this
        },
        trimStart: function () {
            return this.value = t.String.trimStart(this.value), this
        },
        trimEnd: function () {
            return this.value = t.String.trimEnd(this.value), this
        },
        split: function (e) {
            return t.String.split(this.value, e)
        },
        splitTrim: function (e) {
            return t.String.splitTrim(this.value, e)
        },
        startsWith: function (e, n) {
            return t.String.startsWith(this.value, e, n)
        },
        endsWith: function (e, n) {
            return t.String.endsWith(this.value, e, n)
        },
        contains: function (e) {
            return t.String.contains(this.value, e)
        },
        padLeft: function (e, n) {
            return this.value = t.String.padLeft(this.value, e, n), this
        },
        padRight: function (e, n) {
            return this.value = t.String.padRight(this.value, e, n), this
        },
        toCamelCase: function () {
            return this.value = t.String.toCamelCase(this.value), this
        },
        toHyphenate: function () {
            return this.value = t.String.toHyphenate(this.value), this
        },
        between: function (e, n) {
            return this.value = t.String.between(this.value, e, n), this
        },
        toUtf8: function () {
            return this.value = t.String.toUtf8(this.value), this
        },
        toValue: function (e) {
            return t.String.toValue(this.value)
        }
    }, $.extend(window.String.prototype, {
        format: function (t) {
            var e = this;
            if (arguments.length > 0) if (1 == arguments.length && "object" == typeof t) {
                for (var n in t) if (void 0 != t[n]) {
                    var r = new RegExp("({" + n + "})", "g");
                    e = e.replace(r, t[n])
                }
            } else for (var i = 0; i < arguments.length; i++) if (void 0 != arguments[i]) {
                var r = new RegExp("({)" + i + "(})", "g");
                e = e.replace(r, arguments[i])
            }
            return e
        },
        trim: function () {
            return t.String.trim(this)
        }
    }), t.String.prototype.init.prototype = t.String.prototype
}(window.WE),
function (t) {
    t.Date = {
        parse: function (t) {
            if (/^\d{10}$/.test(t)) return new Date(1e3 * t);
            if (/^\d{13}$/.test(t)) return new Date(1 * t);
            t = t.trim();
            var e = /^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/,
                n = t.match(e);
            if (n) {
                var r = n[1],
                    i = parseInt(n[2] - 1, 10),
                    a = parseInt(n[3], 10),
                    o = parseInt(n[4], 10),
                    s = parseInt(n[5], 10),
                    u = parseInt(n[6], 10);
                return new Date(r, i, a, o, s, u)
            }
            return null
        },
        format: function (t, e) {
            var n = {
                "M+": e.getMonth() + 1,
                "d+": e.getDate(),
                "h+": e.getHours(),
                "m+": e.getMinutes(),
                "s+": e.getSeconds(),
                "q+": Math.floor((e.getMonth() + 3) / 3),
                S: e.getMilliseconds()
            };
            /(y+)/.test(t) && (t = t.replace(RegExp.$1, (e.getFullYear() + "").substr(4 - RegExp.$1.length)));
            for (var r in n) new RegExp("(" + r + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? n[r] :
                    ("00" + n[r]).substr(("" + n[r]).length)));
            return t
        },
        getDaysPass: function (t, e) {
            var n = e.getTime() - t.getTime(),
                r = Math.round(n / 1e3 / 60 / 60 / 24);
            return (0 == r || 1 == r) && (r = t.getDate() == e.getDate() ? 0 : 1), r
        },
        isSameDay: function (t, e) {
            return t.getDate() == e.getDate() && t.getMonth() == e.getMonth() && t.getFullYear() == e.getFullYear()
        },
        getServerTime: function () {
            var e = new Date,
                n = top.WE && top.WE._ClientDiffTime_ || t._ClientDiffTime_;
            return n ? new Date(e.getTime() - n) : e
        },
        getFriendlyString: function (t, e) {
            if (!t) return "";
            "number" == typeof t && (t = new Date(1e3 * t)), e = e || new Date;
            var n, r = e.getTime() - t.getTime();
            if (0 > r) n = this.format("yyyy-M-dd", t);
            else if (t.getYear() == e.getYear() && t.getMonth() == e.getMonth() && t.getDate() == e.getDate()) {
                var i = Math.round(r / 1e3 / 60);
                n = 0 == i ? "刚刚" : i > 0 && 60 > i ? i + "分钟前" : Math.floor(i / 60) + "小时前"
            } else n = t.getYear() == (new Date).getYear() ? this.format("M-dd(w)", t) : this.format("yyyy-M-dd(w)", t);
            return n
        },
        parseValidDateStr: function (t, e, n) {
            var r, i, a, o;
            return void 0 === e && (e = 1970), void 0 === n && (n = 2100), (o = t.match(
                /^(\d{4})([\.\/-]?)(\d{1,2})\2(\d{1,2})$/)) ? (r = parseInt(o[1], 10), i = parseInt(o[3], 10), a =
                parseInt(o[4], 10), 0 === a || 0 === i || a > 31 || i > 12 || e > r || r > n ? null : 2 === i && a > 28 +
                (r % 400 == 0 || r % 4 == 0 && r % 100 != 0) ? null : "46911".indexOf(i) >= 0 && 30 === a ? null : "" ==
                o[2] && 4 != (o[3] + o[4]).length ? null : new Date(r, i - 1, a)) : null
        },
        getHelloString: function (t) {
            t = t || new Date;
            var e = t.getHours(),
                n = {
                    0: "凌晨",
                    1: "上午",
                    2: "中午",
                    3: "下午",
                    4: "晚上",
                    5: "深夜"
                }, r = "555000111112233333344444",
                i = r.charAt(e);
            return n[i]
        },
        getDaysOfMonth: function (t) {
            t || (t = new Date);
            var e = this.isLeapYear(t.getFullYear());
            return [31, e ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][t.getMonth()]
        },
        isLeapYear: function (t) {
            return t || (t = new Date), t.getFullYear && (t = t.getFullYear()), t % 400 == 0 || t % 4 == 0 && t % 100 !=
                0
        },
        WEEKDAYS: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
        getChineseWeekDay: function (t) {
            return t || (t = new Date), this.WEEKDAYS[t.getDay()]
        },
        getFirstWeekDayOfMonth: function (t) {
            return t = t ? new Date(t) : new Date, t.setDate(1), t.getDay()
        },
        getWeeksOfMonth: function (t) {
            t || (t = new Date);
            var e = this.getFirstWeekDayOfMonth(t),
                n = this.getDaysOfMonth(t);
            return Math.ceil((n + (6 - e)) / 7)
        },
        getThisMonday: function () {
            var t = new Date;
            return new Date(t.getTime() - 864e5 * (t.getDay() - 1))
        },
        getWeekDateByDays: function (t) {
            t || (t = 0);
            var e = this.getThisMonday();
            return new Date(1e3 * (e.getTime() / 1e3 + 86400 * t))
        },
        getDateByDays: function (t, e) {
            return t || (t = new Date), new Date(t.getTime() + 864e5 * e)
        },
        getTimeObj: function (t) {
            var e = 1e3,
                n = 60 * e,
                r = 60 * n,
                i = 24 * r,
                a = parseInt(t / i),
                o = parseInt((t - a * i) / r),
                s = parseInt((t - a * i - o * r) / n),
                u = parseInt((t - a * i - o * r - s * n) / e),
                l = 10 > a ? "0" + a : "" + a,
                c = 10 > o ? "0" + o : "" + o,
                h = 10 > s ? "0" + s : "" + s,
                f = 10 > u ? "0" + u : "" + u,
                d = {};
            return d.date = l, d.hour = c, d.minute = h, d.second = f, d
        }
    }, Date.prototype.format = function (e) {
        return t.Date.format(e, this)
    }, $Date = t.Date
}(WE),
function (t) {
    t.Array = function (e) {
        return new t.Array.prototype.init(e)
    }, t.Object.extend(t.Array, {
        each: function (t, e, n) {
            var r = t.length;
            if (n === !0) for (var i = r; i-- && e(t[i], i) !== !1;);
            else for (var i = 0; r > i && e(t[i], i) !== !1; i++);
            return t
        },
        parse: function (t, e) {
            if (t instanceof Array) return t;
            var n = [];
            if (e === !0) {
                for (var r in t) "length" !== r && n.push(t[r]);
                return n
            }
            if (!t || !t.length) return [];
            try {
                n = Array.prototype.slice.call(t, 0)
            } catch (i) {
                for (var a = 0, o = t.length; o > a; a++) n.push(t[a])
            }
            return n
        },
        toObject: function (e, n) {
            if (!e || !t.Object.isArray(e)) return null;
            var r = {};
            if (void 0 === n) {
                var i = e.length;
                r.length = i;
                for (var a = 0; i > a; a++) r[a] = e[a];
                return r
            }
            if (t.Object.isArray(n)) {
                for (var i = n.length, a = 0; i > a; a++) {
                    var o = n[a],
                        s = e[a];
                    r[o] = s
                }
                return r.length = i, r
            }
            if (t.Object.isPlain(n)) {
                var i = 0;
                for (var o in n) r[o] = e[n[o]], i++;
                return r.length = i, r
            }
            if ("function" == typeof n) {
                for (var i = e.length, a = 0; i > a; a++) {
                    var u = n(e[a], a);
                    if (u instanceof Array) {
                        var o = u[0],
                            s = u[1];
                        r[o] = s
                    } else {
                        if (!t.Object.isPlain(u)) throw new Error("处理函数 maps 返回结果的格式不可识别");
                        for (var o in u) {
                            r[o] = u[o];
                            break
                        }
                    }
                }
                return r.length = i, r
            }
            return r
        },
        map: function (t, e) {
            for (var n = [], r = 0, i = t.length; i > r; r++) {
                var a = e(t[r], r);
                if (null !== a) {
                    if (void 0 === a) break;
                    n.push(a)
                }
            }
            return n
        },
        grep: function (t, e) {
            for (var n = [], r = 0, i = t.length; i > r; r++) {
                var a = t[r];
                e(a, r) === !0 && n.push(a)
            }
            return n
        },
        indexOf: function (t, e) {
            if ("function" == typeof t.indexOf) return t.indexOf(e);
            for (var n = 0, r = t.length; r > n; n++) if (t[n] === e) return n;
            return -1
        },
        contains: function (e, n) {
            return t.Array.indexOf(e, n) > -1
        },
        remove: function (e, n) {
            return t.Array.map(e, function (t, e) {
                return n === t ? null : t
            })
        },
        removeAt: function (e, n) {
            return 0 > n || n >= e.length ? e.slice(0) : t.Array.map(e, function (t, e) {
                return n === e ? null : t
            })
        },
        merge: function () {
            for (var t = [], e = 0, n = arguments.length; n > e; e++) {
                var r = arguments[e];
                void 0 !== r && (t = t.concat(r))
            }
            return t
        },
        mergeUnique: function () {
            for (var e = [], n = arguments.length, r = t.Array.contains, i = 0; n > i; i++) for (var a = arguments[i],
                        o = a.length, s = 0; o > s; s++) r(e, a[s]) || e.push(a[s]);
            return e
        },
        unique: function (e) {
            return t.Array.mergeUnique(e)
        },
        toggle: function (e, n) {
            if (t.Array.contains(e, n)) return t.Array.remove(e, n);
            var r = e.slice(0);
            return r.push(n), r
        },
        find: function (e, n, r) {
            return t.Array.findIndex(e, n, r) > -1
        },
        findIndex: function (t, e, n) {
            n = n || 0;
            for (var r = n, i = t.length; i > r; r++) if (e(t[r], r) === !0) return r;
            return -1
        },
        findItem: function (t, e, n) {
            n = n || 0;
            for (var r = n, i = t.length; i > r; r++) {
                var a = t[r];
                if (e(a, r) === !0) return a
            }
            return null
        },
        random: function (t) {
            for (var e = t.slice(0), n = 0, r = e.length; r > n; n++) {
                var i = parseInt(Math.random() * n),
                    a = e[n];
                e[n] = e[i], e[i] = a
            }
            return e
        },
        randomItem: function (e) {
            var n = e.length;
            if (1 > n) return void 0;
            var r = t.Math.randomInt(0, n - 1);
            return e[r]
        },
        get: function (t, e) {
            var n = t.length;
            if (e >= 0 && n > e) return t[e];
            var r = e + n;
            return 0 > e && r >= 0 ? t[r] : null == e ? t.slice(0) : void 0
        },
        trim: function (e) {
            return t.Array.map(e, function (t, e) {
                return null == t ? null : t
            })
        },
        group: function (e, n, r) {
            var i = t.Array.slide(e, n, n);
            return r === !0 && (i[i.length - 1] = e.slice(-n)), i
        },
        slide: function (t, e, n) {
            if (e >= t.length) return [t];
            n = n || 1;
            for (var r = [], i = 0, a = t.length; a > i; i += n) {
                var o = i + e;
                if (r.push(t.slice(i, o)), o >= a) break
            }
            return r
        },
        circleSlice: function (t, e, n) {
            var r = t.slice(e, e + n),
                i = [],
                a = n - r.length;
            return a > 0 && (i = t.slice(0, a)), r.concat(i)
        },
        circleSlide: function (e, n, r) {
            if (e.length < n) return [e];
            r = r || 1;
            for (var i = [], a = t.Array.circleSlice, o = 0, s = e.length; s > o; o += r) i.push(a(e, o, n));
            return i
        },
        sum: function (t, e, n) {
            for (var r = 0, i = !(void 0 === n), a = 0, o = t.length; o > a; a++) {
                var s = i ? t[a][n] : t[a];
                if (isNaN(s)) {
                    if (e === !0) continue;
                    throw new Error("第 " + a + " 个元素的值为 NaN")
                }
                r += Number(s)
            }
            return r
        },
        max: function (t, e, n) {
            for (var r = 0, i = !(void 0 === n), a = 0, o = t.length; o > a; a++) {
                var s = i ? t[a][n] : t[a];
                if (isNaN(s)) {
                    if (e === !0) continue;
                    throw new Error("第 " + a + " 个元素的值为 NaN")
                }
                s = Number(s), s > r && (r = s)
            }
            return r
        },
        hasItem: function (e) {
            return t.Object.isArray(e) && e.length > 0
        },
        reduceDimension: function (t, e) {
            e = e || 1;
            for (var n = t, r = Array.prototype.concat, i = 0; e > i; i++) n = r.apply([], n);
            return n
        },
        descartes: function (t, e) {
            function n(t, e, n) {
                for (var r = [], i = 0, a = t.length; a > i; i++) for (var o = 0, s = e.length; s > o; o++) {
                    var u = [];
                    n ? (u = u.concat(t[i]), u.push(e[o])) : (u[0] = t[i], u[1] = e[o]), r.push(u)
                }
                return r
            }
            for (var r = n(t, e), i = 2, a = arguments.length; a > i; i++) r = n(r, arguments[i], !0);
            return r
        },
        divideDescartes: function (t, e) {
            for (var n = t.length, r = [], i = 0, a = e.length; a > i; i++) {
                for (var o = e[i], s = n / o, u = [], l = 0; o > l; l++) u.push(t[l * s][i]);
                n = s, r[i] = u
            }
            return r
        },
        transpose: function (t) {
            for (var e = t, n = [], r = e.length, i = 1, a = 0; i > a; a++) {
                for (var o = [], s = 0; r > s; s++) e[s].length > i && (i = e[s].length), o.push(e[s][a]);
                n[a] = o
            }
            return n
        },
        intersection: function (e, n) {
            function r(e, n) {
                for (var r = [], i = 0, a = e.length; a > i; i++) for (var o = e[i], s = 0, u = n.length; u > s; s++) if (
                            o === n[s]) {
                    r.push(o);
                    break
                }
                return t.Array.unique(r)
            }
            for (var i = e, a = 1, o = arguments.length; o > a; a++) i = r(i, arguments[a]);
            return i
        },
        isEqual: function (t, e, n) {
            if (!(t instanceof Array && e instanceof Array && t.length == e.length)) return !1;
            n = n || function (t, e) {
                return t === e
            };
            for (var r = 0, i = t.length; i > r; r++) if (!n(t[r], e[r])) return !1;
            return !0
        },
        isContained: function (e, n) {
            return t.Array.intersection(e, n).length == e.length
        },
        padLeft: function (t, e, n) {
            var r = e - t.length;
            if (0 >= r) return t.slice(-r);
            for (var i = [], a = 0; r > a; a++) i.push(n);
            return i = i.concat(t)
        },
        padRight: function (t, e, n) {
            var r = e - t.length;
            if (0 >= r) return t.slice(0, e);
            for (var i = t.slice(0), a = 0; r > a; a++) i.push(n);
            return i
        },
        pad: function (t, e, n) {
            if (t == e) return [];
            n = Math.abs(n || 1);
            var r = [];
            if (e > t) for (var i = t; e > i; i += n) r.push(i);
            else for (var i = t; i > e; i -= n) r.push(i);
            return r
        }
    }), t.Array.prototype = {
        constructor: t.Array,
        value: [],
        init: function (e) {
            this.value = t.Array.parse(e)
        },
        toString: function (t) {
            return t = void 0 === t ? "" : t, this.value.join(t)
        },
        valueOf: function () {
            return this.value
        },
        each: function (e, n) {
            return t.Array.each(this.value, e, n), this
        },
        toObject: function (e) {
            return t.Array.toObject(this.value, e)
        },
        map: function (e) {
            return this.value = t.Array.map(this.value, e), this
        },
        grep: function (e) {
            return this.value = t.Array.grep(this.value, e), this
        },
        indexOf: function (e) {
            return t.Array.indexOf(this.value, e)
        },
        contains: function (e) {
            return t.Array.contains(this.value, e)
        },
        remove: function (e) {
            return this.value = t.Array.remove(this.value, e), this
        },
        removeAt: function (e) {
            return this.value = t.Array.removeAt(this.value, e), this
        },
        merge: function () {
            var e = [this.value];
            return e = e.concat(Array.prototype.slice.call(arguments, 0)), this.value = t.Array.merge.apply(null, e),
                this
        },
        mergeUnique: function () {
            var e = [this.value];
            return e = e.concat(Array.prototype.slice.call(arguments, 0)), this.value = t.Array.mergeUnique.apply(null,
                e), this
        },
        unique: function () {
            return this.value = t.Array.unique(this.value), this
        },
        toggle: function (e) {
            return this.value = t.Array.toggle(this.value, e), this
        },
        find: function (e, n) {
            return t.Array.find(this.value, e, n)
        },
        findIndex: function (e, n) {
            return t.Array.findIndex(this.value, e, n)
        },
        findItem: function (e, n) {
            return t.Array.findItem(this.value, e, n)
        },
        random: function () {
            return this.value = t.Array.random(this.value), this
        },
        randomItem: function () {
            return t.Array.randomItem(this.value)
        },
        get: function (e) {
            return t.Array.get(this.value, e)
        },
        trim: function () {
            return this.value = t.Array.trim(this.value), this
        },
        group: function (e, n) {
            return t.Array.group(this.value, e, n)
        },
        slide: function (e, n) {
            return t.Array.slide(this.value, e, n)
        },
        circleSlice: function (e, n) {
            return this.value = t.Array.circleSlice(this.value, e, n), this
        },
        circleSlide: function (e, n) {
            return t.Array.circleSlide(this.value, e, n)
        },
        sum: function (e, n) {
            return t.Array.sum(this.value, e, n)
        },
        max: function (e, n) {
            return t.Array.max(this.value, e, n)
        },
        hasItem: function () {
            return t.Array.hasItem(this.value)
        },
        reduceDimension: function (e) {
            return this.value = t.Array.reduceDimension(this.value, e), this
        },
        descartes: function () {
            var e = t.Array.parse(arguments);
            return e = [this.value].concat(e), this.value = t.Array.descartes.apply(null, e), this
        },
        divideDescartes: function (e) {
            return this.value = t.Array.divideDescartes(this.value, e), this
        },
        transpose: function () {
            return this.value = t.Array.transpose(this.value), this
        },
        intersection: function () {
            var e = t.Array.parse(arguments);
            return e = [this.value].concat(e), this.value = t.Array.intersection.apply(null, e), this
        },
        isEqual: function (e, n) {
            return t.Array.isEqual(this.value, e, n)
        },
        isContained: function (e) {
            return t.Array.isContained(this.value, e)
        },
        padLeft: function (e, n) {
            return this.value = t.Array.padLeft(this.value, e, n), this
        },
        padRight: function (e, n) {
            return this.value = t.Array.padRight(this.value, e, n), this
        },
        pad: function (e, n, r) {
            return this.value = t.Array.pad(e, n, r), this
        }
    }, t.Array.prototype.init.prototype = t.Array.prototype
}(window.WE),
function (t, e) {
    WE.HttpClient = t.Model.extend({
        initialize: function (t) { },
        request: function (t, e) {
            var n = this;
            if (this.requestOptions = t, this.xhr) throw "一个HTTPClient实例只能执行一次request操作";
            if (this.trigger("beforerequest", t, e), t.cancel) return t.async === !1 ? t.responseResult : this;
            var r = this.xhr = this.utilCreateXHR(t);
            if (t.timeout) var i = setTimeout(function () {
                (3 != r.readyState || 200 != r.status) && (r.abort(), n.onTimeout())
            }, t.timeout);
            e && this.on("response", e), r.onreadystatechange = function (e) {
                if (t.async !== !1 && 4 == r.readyState && 0 != r.status) {
                    clearTimeout(i);
                    var a = r.status;
                    if (1223 === a && window.ActiveXObject && (a = 204), 304 == a || a >= 200 && 300 > a) {
                        var o = n.utilGetHttpHeaders(r);
                        if (o && o.Date) {
                            new Date(o.Date)
                        }
                        n.onResponse({
                            responseText: r.responseText,
                            status: a,
                            getHeaders: function () {
                                return n.utilGetHttpHeaders(r)
                            }
                        })
                    } else n.onError({
                        status: a,
                        responseText: r.responseText
                    })
                }
            };
            var a = t.data,
                o = t.method || "get";
            if ("object" == typeof a) {
                a = [];
                for (var s in t.data) a.push(s + "=" + encodeURIComponent(t.data[s]));
                a = a.join("&"), t.headers || (t.headers = {}), t.headers["Content-Type"] || (t.headers["Content-Type"] =
                    "application/x-www-form-urlencoded")
            }
            return "get" == o.toLowerCase() && "string" == typeof a && (t.url += "&" + a, a = ""), r.open(o, t.url, t.async !== !
                1), this.utilSetHttpHeaders(t.headers, r), t.async === !1 ? (r.send(a), clearTimeout(i), 304 == r.status ||
                r.status >= 200 && r.status < 300 ? n.onResponse({
                    responseText: r.responseText,
                    status: r.status,
                    getHeaders: function () {
                        return n.utilGetHttpHeaders(r)
                    }
                }) : n.onError({
                    status: r.status,
                    responseText: r.responseText
                })) : (r.send(a), this)
        },
        abort: function (t) {
            return this.xhr.abort(), this.onAbort(), this
        },
        utilCreateXHR: function (t) {
            var e = t && t.window || window;
            if (e.XMLHttpRequest) return new e.XMLHttpRequest;
            for (var n = ["MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "Microsoft.XMLHTTP"], r = 0; r <
                n.length; r++) try {
                    return new e.ActiveXObject(n[r])
                } catch (i) { }
        },
        utilSetHttpHeaders: function (t, e) {
            if (t) for (var n in t) e.setRequestHeader(n, t[n])
        },
        utilGetHttpHeaders: function (t) {
            var e = t.getAllResponseHeaders(),
                n = {};
            if (e) {
                e = e.split(/\r?\n/);
                for (var r = 0; r < e.length; r++) {
                    var i = e[r],
                        a = i.split(": "),
                        o = a[0].replace(/^\w|-\w/g, function (t) {
                            return t.toUpperCase()
                        });
                    o && a[1] && (n[o] = a[1])
                }
            }
            return n
        },
        onAbort: function () {
            this.trigger("abort")
        },
        onResponse: function (t) {
            return this.trigger("response", t), t
        },
        onError: function (t) {
            this.trigger("error", t)
        },
        onTimeout: function () {
            this.trigger("timeout")
        }
    })
}(Backbone, jQuery),
function (t, e, n) {
    n.Model = {};
    var r = Backbone.Model;
    n.Model.ModelBase = r.extend({
        initialize: function (t) {
            var n = this.name || this.get("name");
            if (null == n) throw "继承自ModelBase的类型缺少name属性";
            if (t && !e.isObject(t)) throw "继承自ModelBase的类型初始化参数必须为Object类型"
        },
        trigger: function (t, n) {
            if ("undefined" == typeof n && (n = {}), !e.isObject(n)) throw this.get("name") + ".trigger(" + t +
                    ")方法必须使用Object数据参数";
            try {
                return r.prototype.trigger.apply(this, arguments)
            } catch (i) {
                console.error("trigger异常", i.toString())
            }
        }
    })
}(jQuery, _, WE),
function (t, e) {
    var n = t;
    e.View = {}, e.View.ViewBase = Backbone.View.extend({
        initialize: function (n) {
            if (n || (n = {}), n.events) for (var r in n.events) this.on(r, n.events[r]);
            var i = n.style || this.style;
            i && this.el && (t.browser.msie ? this.el.style.cssText = i : this.$el.attr("style", i)), n.width && this.$el
                .width(n.width), n.height && this.$el.height(n.height), this.id || this.el && this.el.id || (this.id =
                this.getRandomId(), this.el && (this.el.id = this.id)), e.View.registerView(this.id, this)
        },
        name: "WE.View.ViewBase",
        render: function () {
            var t = this;
            if (this.rendered) return this;
            this.rendered = !0;
            var e = this.options;
            return e.replaceInnerText && n.each(e.replaceInnerText, function (e, n) {
                t.$(e).text(n)
            }), e.replaceInnerHTML && n.each(e.replaceInnerHTML, function (e, n) {
                t.$(e).html(n)
            }), e.hides && this.$(e.hides).hide(), e.shows && this.$(e.shows).css("display", ""), this.trigger("render"),
                setTimeout(function () {
                    t.trigger("print")
                }, 0), this
        },
        remove: function () {
            return this.$el.remove(), this.isRemoved = !0, this.trigger("remove"), this
        },
        show: function () {
            return this.$el.show(), this.trigger("show"), this
        },
        hide: function () {
            return this.$el.hide(), this.trigger("hide"), this
        },
        isHide: function (t) {
            return $D.isHide(this.el, t)
        },
        getHeight: function () {
            return this.$el ? this.$el.height() : 0
        },
        getWidth: function () {
            return this.$el ? this.$el.width() : 0
        },
        setWidth: function (t) {
            return this.setSize(t, null)
        },
        setHeight: function (t) {
            return this.setSize(null, t)
        },
        setPosition: function (t, e) {
            return this.$el && (this.$el.css({
                left: t,
                top: e
            }), this.trigger("move")), this
        },
        setSize: function (t, e) {
            return this.$el && ((t || 0 === t) && this.$el.width(t), (e || 0 === e) && this.$el.height(e), this.trigger(
                "resize")), this
        },
        onUpdate: function () {
            this.trigger("update")
        },
        getEl: function () {
            return this.el
        },
        get$El: function () {
            return this.$el
        },
        getCidEl: function (t, e) {
            return t ? n("#" + this.cid + "-" + t, e || document) : null
        },
        getId: function () {
            return this.el.id
        },
        getRandomId: function () {
            return "view_" + Math.random()
        },
        setHtml: function (t) {
            this.el && (this.el.innerHTML = t, this.onUpdate())
        }
    }), n.extend(e.View, {
        getView: function (t) {
            return this.AllViews[t] || null
        },
        AllViews: {},
        registerView: function (t, e) {
            this.AllViews[t] = e
        }
    })
}(jQuery, WE),
function (t, e, n) {
    t.namespace("WE.Api.HttpClient", t.HttpClient.extend({
        initialize: function (e) {
            t.HttpClient.prototype.initialize.apply(this, arguments)
        },
        request: function (e, n) {
            return t.HttpClient.prototype.request.apply(this, arguments), this
        }
    })), t.namespace("WE.Api", {
        call: function (n, r, i, a) {
            i = i || {};
            var o = new t.Api.HttpClient({}),
                s = i.httpMethod || "post",
                u = this.getUrl(n),
                l = e.cookie(t.Constant.COOKIE_TOKEN) || "";
            l.trim().length > 0 && !r.token && (r.token = l), o.on("error", function () {
                i.error ? i.error.apply(o, arguments) : i.success.call(scope, {
                    responseData: null,
                    status: arguments[0].status,
                    responseText: arguments[0].responseText
                })
            }), o.request({
                url: u,
                method: s,
                data: this.checkData(r),
                timeout: 2e4
            }, function (n) {
                var r = e.parseJSON(n.responseText),
                    o = new t.WebStatus;
                return o.set({
                    code: r.status,
                    data: r.data || {},
                    msg: r.info || ""
                }), o.get("success") ? void (_.isFunction(i.success) && i.success.call(a, o.toJSON())) : void (_.isFunction(
                    i.error) && i.error.call(a, o.toJSON()))
            })
        },
        getUrl: function (t) {
            return "http://{0}/api.php?m={1}&a={2}".format(this.getHost(), t.model, t.command)
        },
        getHost: function () {
            return location.host
        },
        checkData: function (t) {
            if (_.isObject(t)) for (var e in t) (_.isNull(t[e]) || _.isUndefined(t[e])) && (t[e] = "");
            return t
        }
    }), t.namespace("WE.ApiSp", {
        call: function (n, r, i, a) {
            i = i || {};
            var o = new t.Api.HttpClient({}),
                s = i.httpMethod || "post",
                u = this.getUrl(n),
                l = e.cookie(t.Constant.COOKIE_TOKEN) || "";
            l.trim().length > 0 && !r.token && (r.token = l), o.on("error", function () {
                i.error ? i.error.apply(o, arguments) : i.success.call(scope, {
                    responseData: null,
                    status: arguments[0].status,
                    responseText: arguments[0].responseText
                })
            }), o.request({
                url: u,
                method: s,
                data: this.checkData(r),
                timeout: 2e4,
                async: !1
            }, function (n) {
                var r = e.parseJSON(n.responseText),
                    o = new t.WebStatus;
                return o.set({
                    code: r.status,
                    data: r.data || {},
                    msg: r.info || ""
                }), o.get("success") ? void (_.isFunction(i.success) && i.success.call(a, o.toJSON())) : void (_.isFunction(
                    i.error) && i.error.call(a, o.toJSON()))
            })
        },
        getUrl: function (t) {
            return "http://{0}/api.php?m={1}&a={2}".format(this.getHost(), t.model, t.command)
        },
        getHost: function () {
            return location.host
        },
        checkData: function (t) {
            if (_.isObject(t)) for (var e in t) (_.isNull(t[e]) || _.isUndefined(t[e])) && (t[e] = "");
            return t
        }
    }), t.Api.Login = function (t, e) {
        var n = t.data || {}, r = {
            model: "user",
            command: "login"
        }, i = n;
        this.call(r, i, t, e)
    }, t.Api.QQ_Login = function (t, e) {
        var n = t.data || {}, r = {
            model: "user",
            command: "qqlogin"
        }, i = n;
        this.call(r, i, t, e)
    }, t.Api.Sina_Login = function (t, e) {
        var n = t.data || {}, r = {
            model: "user",
            command: "getSina"
        }, i = n;
        t.httpMethod = "get", this.call(r, i, t, e)
    }, t.Api.Register = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "user",
                command: "regist"
            };
        this.call(i, r, t, e)
    }, t.Api.mobileRegist = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "user",
                command: "mobileRegist"
            };
        this.call(i, r, t, e)
    }, t.Api.LoginCheck = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "user",
                command: "loginCheck"
            };
        this.call(i, r, t, e)
    }, t.Api.Active = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "user",
                command: "active"
            };
        this.call(i, r, t, e)
    }, t.Api.Forget = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "user",
                command: "forgetpwd"
            };
        this.call(i, r, t, e)
    }, t.Api.Reset = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "user",
                command: "resetpwd"
            };
        this.call(i, r, t, e)
    }, t.Api.Logout = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "user",
                command: "logout"
            };
        this.call(i, r, t, e)
    }, t.Api.Feedback = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "feedback"
            };
        this.call(i, r, t, e)
    }, t.Api.changePassword = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "user",
                command: "uppwd"
            };
        this.call(i, r, t, e)
    }, t.Api.getTempList = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "getTempList"
            };
        this.call(i, r, t, e)
    }, t.Api.getWordList = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "getWordList"
            };
        this.call(i, r, t, e)
    }, t.Api.shoppingCart = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "shoppingCart"
            };
        this.call(i, r, t, e)
    }, t.Api.getShoppingCart = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "getShoppingCart"
            };
        this.call(i, r, t, e)
    }, t.Api.getOrderList = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "getOrderList"
            };
        this.call(i, r, t, e)
    }, t.Api.getWordRec = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "getWordRec"
            };
        this.call(i, r, t, e)
    }, t.Api.submitOrder = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "submitOrder"
            };
        this.call(i, r, t, e)
    }, t.Api.payOrder = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "payOrder"
            };
        this.call(i, r, t, e)
    }, t.Api.buyNow = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "buyNow"
            };
        this.call(i, r, t, e)
    }, t.Api.getWordDetail = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "getWordDetail"
            };
        this.call(i, r, t, e)
    }, t.Api.getFinishedOrder = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "getFinishedOrder"
            };
        this.call(i, r, t, e)
    }, t.ApiSp.getBlogList = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "getBlogList"
            };
        this.call(i, r, t, e)
    }, t.Api.setGood = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "setGood"
            };
        this.call(i, r, t, e)
    }, t.Api.checkCoupons = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "checkCoupons"
            };
        this.call(i, r, t, e)
    }, t.ApiSp.getBlogShortList = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "getBlogShortList"
            };
        this.call(i, r, t, e)
    }, t.ApiSp.getBlogContent = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "getBlogArticle"
            };
        this.call(i, r, t, e)
    }, t.Api.finishPay = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "finishPay"
            };
        this.call(i, r, t, e)
    }, t.Api.actionCollect = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "liketem"
            };
        this.call(i, r, t, e)
    }, t.Api.start = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "main"
            };
        this.call(i, r, t, e)
    }, t.Api.getUserResume = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "getList"
            };
        this.call(i, r, t, e)
    }, t.Api.getNewResume = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "getNewResume"
            };
        this.call(i, r, t, e)
    }, t.Api.getCollectResume = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "user",
                command: "likelist"
            };
        this.call(i, r, t, e)
    }, t.Api.sendMail = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "sendmail"
            };
        this.call(i, r, t, e)
    }, t.Api.download = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "user",
                command: "download"
            };
        this.call(i, r, t, e)
    }, t.Api.actionMain = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "user",
                command: "actionMain"
            };
        this.call(i, r, t, e)
    }, t.Api.removeResume = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "del_all"
            };
        this.call(i, r, t, e)
    }, t.Api.getResumeDetail = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "getResumeDetail"
            };
        this.call(i, r, t, e)
    }, t.Api.getTemplate = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "getTemplate"
            };
        this.call(i, r, t, e)
    }, t.Api.getTemplatePInfo = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "getTemplatePInfo"
            };
        this.call(i, r, t, e)
    }, t.Api.autoSave = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "sort"
            };
        r.sort = JSON.stringify(r.sort), this.call(i, r, t, e)
    }, t.Api.resumeSelect = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "select_one"
            };
        this.call(i, r, t, e)
    }, t.Api.resumeRemove = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "del_one"
            };
        this.call(i, r, t, e)
    }, t.Api.baseInfo = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "info"
            };
        this.call(i, r, t, e)
    }, t.Api.dirt = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "dirt"
            };
        this.call(i, r, t, e)
    }, t.Api.education = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "jiaoyu"
            };
        this.call(i, r, t, e)
    }, t.Api.school = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "xiaoyuan"
            };
        this.call(i, r, t, e)
    }, t.Api.work = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "gongzuo"
            };
        this.call(i, r, t, e)
    }, t.Api.project = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "xiangmu"
            };
        this.call(i, r, t, e)
    }, t.Api.skill = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "jineng"
            };
        this.call(i, r, t, e)
    }, t.Api.certificate = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "zhengshu"
            };
        this.call(i, r, t, e)
    }, t.Api.prize = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "prize"
            };
        this.call(i, r, t, e)
    }, t.Api.evaluation = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "zwpingjia"
            };
        this.call(i, r, t, e)
    }, t.Api.research = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "keyan"
            };
        this.call(i, r, t, e)
    }, t.Api.hobbies = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "aihao"
            };
        this.call(i, r, t, e)
    }, t.Api.subject = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "Course"
            };
        this.call(i, r, t, e)
    }, t.Api.article = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "Article"
            };
        this.call(i, r, t, e)
    }, t.Api.diy = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "diy"
            };
        this.call(i, r, t, e)
    }, t.Api.setDiyType = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "setDiyType"
            };
        this.call(i, r, t, e)
    }, t.Api.schoolLogo = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "selectLogo"
            };
        this.call(i, r, t, e)
    }, t.Api.getInternshipList = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "job",
                command: "getInternshipList"
            };
        this.call(i, r, t, e)
    }, t.Api.getJobDetail = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "job",
                command: "getJobDetail"
            };
        this.call(i, r, t, e)
    }, t.Api.getFilledInter = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "job",
                command: "getFilledInter"
            };
        this.call(i, r, t, e)
    }, t.Api.searchInternship = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "job",
                command: "searchInternship"
            };
        this.call(i, r, t, e)
    }, t.Api.schoolStartUp = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "job",
                command: "schoolStartUp"
            };
        this.call(i, r, t, e)
    }, t.Api.is_free_ip = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "user",
                command: "is_free_ip"
            };
        this.call(i, r, t, e)
    }, t.Api.limitAccount = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "limitAccount"
            };
        this.call(i, r, t, e)
    }, t.Api.bindCoupon = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "bindCoupon"
            };
        this.call(i, r, t, e)
    }, t.Api.getMyCoupons = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "getMyCoupons"
            };
        this.call(i, r, t, e)
    }, t.Api.setKeepTime = function (t, e) {
        var n = t.data || {}, r = n,
            i = {
                model: "resume",
                command: "setKeepTime"
            };
        this.call(i, r, t, e)
    }
}(WE, jQuery, Backbone),
function (t, e) {
    var n = {};
    t.WebStatus = Backbone.Model.extend({
        defaults: function () {
            return {
                code: null,
                data: null,
                msg: null,
                success: null
            }
        },
        initialize: function () {
            this.initEvent()
        },
        initEvent: function () {
            this.on("change:code", function () {
                var t = this.get("code"),
                    e = 1 == t,
                    n = this.getMsgByCode(t);
                this.set({
                    msg: n,
                    success: e
                })
            })
        },
        getMsgByCode: function (r) {
            return 999 == r ? (e.cookie(t.Constant.COOKIE_USER, null), e.cookie(t.Constant.COOKIE_USERID, null), e.cookie(
                t.Constant.COOKIE_PHOTO, null), e.cookie(t.Constant.COOKIE_TOKEN, null), window.location.href =
                location.origin, "您还未登陆, 请登陆后再操作!") : this.get("msg") || n[r] || ""
        },
        toJSON: function () {
            var t = {
                code: this.get("code"),
                msg: this.get("msg"),
                data: this.get("data"),
                success: this.get("success")
            };
            return t
        }
    })
}(WE, jQuery),
function (t, e, n) {
    var r = t.View.ViewBase,
        i = "WE.Base.UI";
    t.namespace(i, r.extend({
        name: i,
        TIPS: {
            TIP: "提示",
            INFO: "消息"
        },
        TYPE: {
            success: "i_icoOkss",
            warn: "i_icoPrompts"
        },
        initialize: function () { },
        initEvents: function () { },
        render: function () { },
        show: function (t, e) {
            e = e || {};
            var n = this,
                r = _.template(this.template.tip);
            r = r({
                cid: this.cid,
                text: t,
                className: e.className || ""
            }), this.hide(), this.tipMessage = $(r), e.delay && setTimeout(function () {
                n.hide()
            }, e.delay), $("body").append(this.tipMessage)
        },
        hide: function () {
            this.tipMessage && this.tipMessage.fadeOut("slow", function () {
                $(this).remove()
            })
        },
        alert: function (t, e) {
            e = e || {};
            var n = e.type || "success",
                r = _.template(this.template.alert);
            r = r({
                cid: this.cid,
                text: t,
                type: this.TYPE[n],
                title: e.title || this.TIPS.TIP
            });
            var i = {};
            i.wrap = $(r), i.close = this.getCidEl("close", i.wrap), i.confirm = this.getCidEl("confirm", i.wrap), e =
                e || {}, i.close.click(function () {
                    i.wrap.remove(), e.close && e.close()
                }), i.confirm.click(function () {
                    i.wrap.remove(), e.callback && e.callback(!0)
                }), $("body").append(i.wrap)
        },
        confirm: function (t, e) {
            e = e || {};
            var n = _.template(this.template.confirm);
            n = n({
                cid: this.cid,
                text: t,
                title: e.title || this.TIPS.TIP
            });
            var r = {};
            r.wrap = $(n), r.close = this.getCidEl("close", r.wrap), r.cancel = this.getCidEl("cancel", r.wrap), r.confirm =
                this.getCidEl("confirm", r.wrap), e = e || {}, r.close.click(function () {
                    r.wrap.remove(), e.close && e.close()
                }), r.cancel.click(function () {
                    r.wrap.remove(), e.callback && e.callback(!1)
                }), r.confirm.click(function () {
                    r.wrap.remove(), e.callback && e.callback(!0)
                }), $("body").append(r.wrap)
        },
        template: {
            confirm: ['<span class="blackBackground" style="display:none;"></span>',
                    '<div class="windowBox" id="<%-cid%>-dialog" style="width:480px;">',
                    '<a href="javascript:void(0);" id="<%-cid%>-close" class="i_icoCloseW i_icoCloseWBtn"></a>',
                    "<h2><%-title%></h2>", '<p class="windowBox_box"><%-text%></p>', '<p class="windowBoxBtn mt_50">',
                    '<a href="javascript:void(0);" id="<%-cid%>-confirm" class="btnK">确定</a>',
                    '<a href="javascript:void(0);" id="<%-cid%>-cancel" class="btnK">取消</a>', "</p>", "</div>"].join(
                "\n"),
            alert: ['<span class="blackBackground" style="display:none;"></span>',
                    '<div class="windowBox" id="<%-cid%>-dialog" style="width:480px;">',
                    '<a href="javascript:void(0);" id="<%-cid%>-close" class="i_icoCloseW i_icoCloseWBtn"></a>',
                    "<h2><%-title%></h2>", '<p class="windowBox_box"><i class="<%-type%> mr_10"></i><%-text%></p>',
                    '<p class="windowBoxBtn mt_50">',
                    '<a href="javascript:void(0);" id="<%-cid%>-confirm" class="btnK">确定</a>', "</p>", "</div>"].join(
                "\n"),
            tip: '<span id="<%-cid%>-tip" class="msg <%-className%>"><%-text%></span>'
        }
    })), t.UI = new t.Base.UI
}(WE, jQuery, Backbone),
function (t, e, n) {
    n.namespace("WE.Upload", function (e) {
        this.image = e.image, this.isSave = e.isSave || 0, this.callback = e.callback, this.upLoadFile = e.upLoadFile,
            this.funName = e.funName || "_myPicture_", this.TIP = {
                PICUPLOAD_ERROR: "图像格式不符合规范!",
                SUCCESS: "您的头像已保存",
                FIAL: "您的头像保存失败",
                UPLOADING: "头像上传中..."
            }, this.init = function () {
                this.ui = {}, this.ui.body = t("body"), this.ui.file = this.upLoadFile, this.ui.parent = this.ui.file.parent(),
                    this.ui.form = t(
                    '<form id="frmUpload" name="frmUpload" method="post" enctype="multipart/form-data" action="" target="ifrmReturnInfo"></form>'),
                    this.ui.iframe = t(
                    '<iframe id="ifrmReturnInfo" name="ifrmReturnInfo" scrolling="no" height="0" width="0" frameborder="0"></iframe>'),
                    this.ui.file.attr("name", "fileUpload"), this.ui.form.attr("action", this.getUploadUrl()), this.ui.body
                    .append(this.ui.form), this.ui.body.append(this.ui.iframe), this.regEvent()
            }, this.regEvent = function () {
                var e = this;
                window[this.funName] = function (t) {
                    var r = t.status || "",
                        i = t.info || "";
                    if (1 == r) {
                        var a = "{0}?rd={1}".format(t.data.photo, Math.random());
                        e.image && e.image.attr("src", a), e.callback && e.callback({
                            photo: t.data.photo
                        }), e.ui.parent.append(e.ui.file), n.UI.show(e.TIP.SUCCESS, {
                            delay: 2e3
                        })
                    } else e.ui.parent.append(e.ui.file), n.UI.show(i, {
                        className: "msgRed",
                        delay: 2e3
                    })
                }, this.ui.file.change(function () {
                    var r = t(this).val();
                    n.UI.show(e.TIP.UPLOADING), e.check(r) && (e.ui.form.append(e.ui.file), e.ui.form.submit())
                })
            }, this.check = function (t) {
                return /\.(?:jpg|jpeg|gif|png|bmp)$/i.test(t) ? !0 : (n.UI.alert(this.TIP.PICUPLOAD_ERROR), this.ui.form.reset(), !
                    1)
            }, this.getUploadUrl = function () {
                if (!this.url) {
                    var e = document.domain,
                        r = t.cookie(n.Constant.COOKIE_TOKEN);
                    this.url = "http://{0}/api.php?m=common&a=upload&token={1}&fun_name={2}&is_save={3}", this.url = this.url
                        .format(e, r, this.funName, this.isSave)
                }
                return this.url
            }, this.init()
    })
}(jQuery, _, WE),
function (t, e, n) {
    n.namespace("WE.Cut", function (e) {
        this.image = e.image, this.isSave = e.isSave || 0, this.callback = e.callback, this.upLoadFile = e.upLoadFile,
            this.subbutton = e.button, this.funName = e.funName || "_myPicture_", this.x = e.x, this.y = e.y, this.x2 =
            e.x2, this.y2 = e.y2, this.w = e.w, this.h = e.h, this.op = "change", this.TIP = {
                PICUPLOAD_ERROR: "图像格式不符合规范(图片大小要求不大于3M)!",
                SUCCESS: "您的头像已保存",
                FIAL: "您的头像保存失败",
                UPLOADING: "头像上传中..."
            }, this.init = function () {
                this.ui = {}, this.ui.body = t("body"), this.ui.file = this.upLoadFile, this.ui.parent = this.ui.file.parent(),
                    this.ui.form = t(
                    '<form id="frmUpload" name="frmUpload" method="post" enctype="multipart/form-data" action="" target="ifrmReturnInfo"></form>'),
                    this.ui.iframe = t(
                    '<iframe id="ifrmReturnInfo" name="ifrmReturnInfo" scrolling="no" height="0" width="0" frameborder="0"></iframe>'),
                    this.ui.file.attr("name", "fileUpload"), this.ui.form.attr("action", this.getUploadUrl()), this.ui.body
                    .append(this.ui.form), this.ui.body.append(this.ui.iframe), this.ui.subbutton = this.subbutton, this.regEvent()
            }, this.regEvent = function () {
                var e = this;
                window[this.funName] = function (t) {
                    var r = t.status || "",
                        i = t.info || "";
                    if (1 == r) {
                        var a = "{0}?rd={1}".format(t.data.photo, Math.random());
                        e.image && e.image.attr("src", a), e.callback && e.callback({
                            photo: t.data.photo,
                            op: e.op
                        }), e.ui.parent.append(e.ui.file), n.UI.show(e.TIP.SUCCESS, {
                            delay: 2e3
                        })
                    } else e.ui.parent.append(e.ui.file), n.UI.show(i, {
                        className: "msgRed",
                        delay: 2e3
                    })
                }, this.ui.file.change(function () {
                    var r = t(this).val();
                    n.UI.show(e.TIP.UPLOADING), e.check(r) && (e.ui.form.append(e.ui.file), e.ui.form.submit())
                }), this.ui.subbutton.click(function () {
                    var t = e.ui.file.val();
                    e.check(t) && (e.op = "cut", e.ui.form.append(e.ui.file), e.x = this.parentElement.children[0].value, e
                        .y = this.parentElement.children[1].value, e.x2 = this.parentElement.children[2].value, e.y2 = this
                        .parentElement.children[3].value, e.w = this.parentElement.children[4].value, e.h = this.parentElement
                        .children[5].value, e.ui.form.attr("action", e.getUploadUrlCut()), e.ui.form.submit())
                })
            }, this.check = function (t) {
                return /\.(?:jpg|jpeg|gif|png|bmp)$/i.test(t) ? !0 : (n.UI.alert(this.TIP.PICUPLOAD_ERROR), this.ui.form.reset(), !
                    1)
            }, this.getUploadUrlCut = function () {
                this.op = "cut";
                var e = document.domain,
                    r = t.cookie(n.Constant.COOKIE_TOKEN);
                return this.url =
                    "http://{0}/api.php?m=common&a=upload&token={1}&fun_name={2}&is_save=1&x={3}&y={4}&x2={5}&y2={6}&width={7}&height={8}",
                    this.url = this.url.format(e, r, this.funName, this.x, this.y, this.x2, this.y2, this.w, this.h), this.url
            }, this.getUploadUrl = function () {
                if (this.op = "change", !this.url) {
                    var e = document.domain,
                        r = t.cookie(n.Constant.COOKIE_TOKEN);
                    this.url = "http://{0}/api.php?m=common&a=upload&token={1}&fun_name={2}&is_save={3}", this.url = this.url
                        .format(e, r, this.funName, this.isSave)
                }
                return this.url
            }, this.init()
    })
}(jQuery, _, WE);